package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * DataType entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "DATA_TYPE")
public class DataType implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 4684694035010705957L;

    // Fields   
    private Long id;
    private String name;
    private String desc;

    // Constructors

    /** default constructor */
    public DataType() {
    }

    /** minimal constructor */
    public DataType(Long id) {
        this.id = id;
    }

    /** full constructor */
    public DataType(Long id, String name, String desc) {
        this.id = id;
        this.name = name;
        this.desc = desc;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "DATA_TYPE_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "NAME", length = 128)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "DESC_", length = 512)
    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "DataType [id=" + id + ", name=" + name + ", desc=" + desc + "]";
    }

}